package com.aaa.controller;


import com.aaa.entity.Financexpend;
import com.aaa.service.impl.FinancexpendServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@Controller
@RequestMapping("fe")
public class FinancexpendController {
    @Resource
    FinancexpendServiceImpl financexpendService;
    @RequestMapping("list")
    @ResponseBody
    public List<Financexpend> list(){
        return financexpendService.list();
    }

    @RequestMapping("save")
    @ResponseBody
    public Boolean save(Financexpend financexpend){
        return financexpendService.save(financexpend);
    }
    @RequestMapping("remove")
    @ResponseBody
    public Boolean remove(Integer efid){
        return financexpendService.removeById(efid);
    }
    @RequestMapping("update")
    @ResponseBody
    public Boolean update(Financexpend financexpend){
        return financexpendService.updateById(financexpend);
    }
}
